﻿using System;
using Telerik.Web.UI;
using Thuoc24h.Business;
using Thuoc24h.Common;

namespace Thuoc24h.AdminCP.Pages
{
    public partial class CustomerOrder : BasePage.BasePages
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void gridData_ItemCommand(object sender, GridCommandEventArgs e)
        {
            string id = string.Empty;

            var commandName = e.CommandName;
            var gridDataItem = e.Item as GridDataItem;
            if (gridDataItem != null)
            {
                id = gridDataItem.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Id"].ToString();
            }

            switch (commandName)
            {

                case CommandNames.Delete:
                    ReviewRepository.ContactDelete(id.ToInt32Return0());
                    break;

            }


        }
    }
}